/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Universidad de La Frontera
 * License Type: Academic
 */
package orm;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class CuentaCriteria extends AbstractORMCriteria {
	public final IntegerExpression cuenta_ID;
	public final StringExpression tipo;
	public final IntegerExpression codigo_medidor;
	public final StringExpression compania;
	public final IntegerExpression cu_status;
	
	public CuentaCriteria(Criteria criteria) {
		super(criteria);
		cuenta_ID = new IntegerExpression("cuenta_ID", this);
		tipo = new StringExpression("tipo", this);
		codigo_medidor = new IntegerExpression("codigo_medidor", this);
		compania = new StringExpression("compania", this);
		cu_status = new IntegerExpression("cu_status", this);
	}
	
	public CuentaCriteria(PersistentSession session) {
		this(session.createCriteria(Cuenta.class));
	}
	
	public CuentaCriteria() throws PersistentException {
		this(orm.TrabajoAplicado1PersistentManager.instance().getSession());
	}
	
	public ClienteCriteria createClienteclienteCriteria() {
		return new ClienteCriteria(createCriteria("clientecliente"));
	}
	
	public ConsumoCriteria createConsumoCriteria() {
		return new ConsumoCriteria(createCriteria("ORM_Consumo"));
	}
	
	public PagoCriteria createPagoCriteria() {
		return new PagoCriteria(createCriteria("ORM_Pago"));
	}
	
	public Cuenta uniqueCuenta() {
		return (Cuenta) super.uniqueResult();
	}
	
	public Cuenta[] listCuenta() {
		java.util.List list = super.list();
		return (Cuenta[]) list.toArray(new Cuenta[list.size()]);
	}
}

